package com.huilang.demo1;



public abstract class OpratingSystem {
   protected VideoFile videoFile;

    public OpratingSystem(VideoFile videoFile) {
        this.videoFile = videoFile;
    }
    public abstract void play(String fileName);
}


class WindowsOpratingSystem extends OpratingSystem {
    public WindowsOpratingSystem(VideoFile videoFile) {
        super(videoFile);
    }

    @Override
    public void play(String fileName) {
     videoFile.decode(fileName);
    }
}

class MacOpratingSystem extends OpratingSystem {
    public MacOpratingSystem(VideoFile videoFile) {
        super(videoFile);
    }

    @Override
    public void play(String fileName) {
        videoFile.decode(fileName);
    }
}